﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutonomicComputingLibrary.CHOP.Heal;
using AutonomicComputingLibrary.MAPE.Monitor;
using AutonomicComputingLibrary.MAPE.Monitor.Main;
using AutonomicComputingLibrary.LogicalSensors;
using AutonomicComputingLibrary.Helpers;
using AutonomicComputingLibrary.MAPE;
using AutonomicComputingLibrary.CHOP;

namespace TestACL
{
    class Program
    {
        RAMManagement ram = new RAMManagement();

        static void Main(string[] args)
        {
            AppStart app = new AppStart();
            app.Run();
         
        }

    }

    class AppStart
    {
       public void Run()
        {

          var mapList = new List<Tuple<dynamic, string>>();

           mapList.Add(new Tuple<dynamic, string>(new RAMHeal(), "KillCMD"));

            var m = new Monitor();
            m.Subscribe(new RAMManagement(30, 1), mapList);

           //consider adding context rewards and distrobuted frameworks

           //test disk management
           //do network checkup

            //CPUManagement RAMManagement work

           //Analyze a = new Analyze();
           //a.InitConfig();

       
           //use this in the executer
           //who writes rank
           //it must be in mape
           //monitor should do it
           //
         ////  XML.CreateHistoryLog("TEST.XML");
         //  XML.AddLogEntry("TEST.XML", "TEST232", 7.ToString());
         //  XML.AddLogEntry("TEST.XML", "TEST323", 8.ToString());
           
         //  //use this to select and order in planning
         //  foreach (var item in XML.SelectEntries("test.xml").OrderBy(i => i.Item2))
         //  {
               
               
         //  }
        }
    }
}
